<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ShowPlayer</title>
</head>
<body>
<h1>Team : ${model.team.name}</h1>
<h2>Player:</h2>
<table border="1">
	<tr>
		<th>Id Player :</th>
		<th>Name:</th>
		<th>Action: </th>
		<th>Action: </th>
		
	</tr>
	
	<c:forEach items="${model.players}" var="player">
	<tr>
		<th>${player.id}</th>
		<th><a href="<c:url value='/detail.htm?playerId=${player.id}&teamId=${model.team.id}'/>">${player.firstName} ${player.lastName}</a></th>
		<th><a href="<c:url value='/updatePlayer.htm?playerId=${player.id}&teamId=${model.team.id}'/>">Update Player</a></th>
		<th><a href="<c:url value='/deletePlayer.htm?playerId=${player.id}&teamId=${model.team.id}'/>">Delete Player</a></th>
	</tr>
	</c:forEach>
	
	</table>
<h2>Reserve</h2>
<table border="1">
	<tr>
		<th>Id Player :</th>
		<th>Name :</th>
		<th>Action: </th>
		<th>Action: </th>
	</tr>
	
	<c:forEach items="${model.reserves}" var="reserve">
	<tr>
		<th>${reserve.id}</th>
		<th><a href="<c:url value='/detail.htm?playerId=${reserve.id}&teamId=${model.team.id}'/>">${reserve.firstName} ${reserve.lastName}</a></th>
		<th><a href="<c:url value='/updatePlayer.htm?playerId=${reserve.id}&teamId=${model.team.id}'/>">Update Player</a></th>
		<th><a href="<c:url value='/deletePlayer.htm?playerId=${reserve.id}&teamId=${model.team.id}'/>">Delete Player</a></th>
	</tr>
	</c:forEach>

	</table>
<h2>Menu Player</h2>
<table border="1">
	<tr>
		<td><a href="<c:url value='/addPlayer.htm?teamId=${model.team.id}'/>">1. Add Player</a></td>
		<td><a href="<c:url value='/showCaptain.htm?teamId=${model.team.id}'/>">2. Add Captain</a></td>		
	</tr>
	
</table>
</body>
</html>